package com.esd.crm.service.impl;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.esd.crm.entity.Product;
import com.esd.crm.mapper.ProductMapper;
import com.esd.crm.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService {

	@Autowired
	private ProductMapper mapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return mapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Product record) {
		return mapper.insert(record);
	}

	@Override
	public int insertSelective(Product record) {
		return mapper.insertSelective(record);
	}

	@Override
	public Product selectByPrimaryKey(Integer id) {

		return mapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Product record) {

		return mapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(Product record) {
		// TODO Auto-generated method stub
		return mapper.updateByPrimaryKeyWithBLOBs(record);
	}

	@Override
	public int updateByPrimaryKey(Product record) {
		// TODO Auto-generated method stub
		return mapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Product> selectByParam(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return mapper.selectByParam(param);
	}

	@Override
	public int selectByParamCount(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return mapper.selectByParamCount(param);
	}

	@Override
	public BigDecimal selectSumAmout(Integer id) {
		return mapper.selectSumAmout(id);
	}

	@Override
	public int deleteByCustomerId(Integer customerId) {
		return mapper.deleteByCustomerId(customerId);
	}

	@Override
	public int deleteByOrderId(String orderId) {
		// TODO Auto-generated method stub
		return mapper.deleteByOrderId(orderId);
	}



}
